# Contributor: Valery Kartel <valery.kartel@gmail.com>
# Maintainer: Valery Kartel <valery.kartel@gmail.com>
pkgname=libnsl
pkgver=1.3.0
pkgrel=0
pkgdesc="Public client interface for NIS(YP) and NIS+ in a IPv6 ready version"
url="https://github.com/thkukuk/libnsl"
arch="all"
license="LGPL-2.0-or-later"
makedepends="autoconf automake gettext-dev libtirpc-dev libtool"
subpackages="$pkgname-static $pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/thkukuk/$pkgname/archive/v$pkgver.tar.gz"

prepare() {
	default_prepare
	autoreconf -vfi
}

check() {
	make check
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="ce75ee9e54f1bdd2b31886e8157ff5f654511c3da017e0d9f8d0da6a2a9f9a78ff2e5f72cfb7ce3a23065f57337db51e3c8842a7e990350a62612018f4960342  libnsl-1.3.0.tar.gz"
